package testes;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import javax.swing.JOptionPane;


public class Remocao {
	
	public static void main(String[] args) {
		Connection con= null;
				
		try {
			con = DriverManager.getConnection
					("jdbc:oracle:thin:@localhost:1521:xe",
							"wagner","java");
			
			
			PreparedStatement pstm = con.prepareStatement
					("update cliente set nm_cli = 'maria',"
							+ "cel_cli = '(48) 7765 9988' where" 
							+ " cd_cli=1");
			pstm.execute();
			JOptionPane.showMessageDialog(null, "Atualizado com "
					+ "sucesso! ");
			
		} catch (SQLException e) {
			JOptionPane.showMessageDialog(null, "Errou" +
					e.getMessage());
			
			e.printStackTrace();
		} 
		
		
		
	}

}
